package fr.umlv.m2.android.quizz;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import fr.umlv.m2.android.quizz.database.Answer;
import fr.umlv.m2.android.quizz.database.AnswerDb;
import fr.umlv.m2.android.quizz.database.Level;
import fr.umlv.m2.android.quizz.database.LevelDb;
import fr.umlv.m2.android.quizz.database.Question;
import fr.umlv.m2.android.quizz.database.QuestionDb;
import fr.umlv.m2.android.quizz.database.Score;
import fr.umlv.m2.android.quizz.database.ScoreDb;
import fr.umlv.m2.android.quizz.database.Theme;
import fr.umlv.m2.android.quizz.database.ThemeDb;
import fr.umlv.m2.android.quizz.database.User;
import fr.umlv.m2.android.quizz.database.UserDb;

public class LoadingActivity extends Activity {	
	/**
	 * The resources loading.
	 */
	private Resources resources;
	
	/**
	 * The database level object.
	 */
	private final LevelDb levelDb;
	/**
	 * The database theme object.
	 */
	private final ThemeDb themeDb;
	/**
	 * The database score object.
	 */
	private final ScoreDb scoreDb;
	/**
	 * The database question object.
	 */
	private final QuestionDb questionDb;
	/**
	 * The database answer object.
	 */
	private final AnswerDb answerDb;
	
	/**
	 * Create the loading activity.
	 * Initialize the database objects.
	 */
	public LoadingActivity() {
		
		this.levelDb = new LevelDb(this);
		this.themeDb = new ThemeDb(this);
		this.scoreDb = new ScoreDb(this);
		this.questionDb = new QuestionDb(this);
		this.answerDb = new AnswerDb(this);
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.loading);
		Thread splashThread = new Thread() {
			
			@Override
			public void run() {
				resources = getResources();
				final User user = initUser();
				try {
					levelDb.open();		
					initLevel();
					
					themeDb.open();
					initTheme();
					questionDb.open();
					answerDb.open();
					initQuestionAndAnswer();
					questionDb.close();
					answerDb.close();
					themeDb.close();
					
					scoreDb.open();
					initScore();
					scoreDb.close();
					levelDb.close();
					
				} finally {
					finish();
					final Intent intent = new Intent(LoadingActivity.this, HomepageActivity.class);
					intent.putExtra("userId", user.getId());

					startActivity(intent);
				}
			};
		};
		
		splashThread.start();
	}
	
	private User initUser() {
		final UserDb userDb = new UserDb(this);
		userDb.open();
		
		final User user;
		if(userDb.getNbUser() == 0) {
			userDb.insertUser(new User(
        			this.resources.getString(R.string.homepageDefaultPlayer))
        	);
			user = userDb.getUserWithId(1);
		} else {
			// User id save.
			user = userDb.getUserWithId(1);
		}
		
		userDb.close();
		return user;
	}
	
	private void initLevel() {
		if(this.levelDb.getNbLevel() < 3) {
			System.out.println("Init level...");
			this.levelDb.clear();
			
			final Level beginnner = new Level(
					this.resources.getString(R.string.loadingBeginnerLevel), 10
			);
			final Level intermediate = new Level(
					this.resources.getString(R.string.loadingIntermediateLevel), 20
			);
			final Level expert = new Level(
					this.resources.getString(R.string.loadingExpertLevel), 30
			);
			this.levelDb.insertLevel(beginnner);
			this.levelDb.insertLevel(intermediate);
			this.levelDb.insertLevel(expert);
			System.out.println("Init level completed.");
		}
	}
	
	private void initTheme() {	
		boolean truncateTable = false;		
		for(Level level : this.levelDb.getAllLevels()) {
			if(this.themeDb.getNbThemeWithLevel(level.getId()) < 4) {
				truncateTable = true;
			}
		}
		
		if(truncateTable) {
			System.out.println("Init theme...");
			this.themeDb.clear();
			
			Level level = this.levelDb.getLevelWithName(
					this.resources.getString(R.string.loadingBeginnerLevel)
			);
			final Theme randomTheme1 = new Theme(
					this.resources.getString(R.string.loadingBeginnerLevelRandomTheme),
					level.getId()
			);
			final Theme moneyTheme = new Theme(
					this.resources.getString(R.string.loadingBeginnerLevelMoneyTheme),
					level.getId()
			);
			final Theme animalsTheme = new Theme(
					this.resources.getString(R.string.loadingBeginnerLevelAnimalsTheme),
					level.getId()
			);
			final Theme geographyTheme = new Theme(
					this.resources.getString(R.string.loadingBeginnerLevelGeographyTheme),
					level.getId()
			);		
			this.themeDb.insertLevel(randomTheme1);
			this.themeDb.insertLevel(moneyTheme);
			this.themeDb.insertLevel(animalsTheme);
			this.themeDb.insertLevel(geographyTheme);
			
			level = this.levelDb.getLevelWithName(
					this.resources.getString(R.string.loadingIntermediateLevel)
			);
			final Theme randomTheme2 = new Theme(
					this.resources.getString(R.string.loadingIntermediateLevelRandomTheme),
					level.getId()
			);
			final Theme generalTheme = new Theme(
					this.resources.getString(R.string.loadingIntermediateLevelGeneralTheme),
					level.getId()
			);
			final Theme musicTheme = new Theme(
					this.resources.getString(R.string.loadingIntermediateLevelMusicTheme),
					level.getId()
			);
			final Theme historyTheme = new Theme(
					this.resources.getString(R.string.loadingIntermediateLevelHistoryTheme),
					level.getId()
			);
			this.themeDb.insertLevel(randomTheme2);
			this.themeDb.insertLevel(generalTheme);
			this.themeDb.insertLevel(musicTheme);
			this.themeDb.insertLevel(historyTheme);
			
			level = this.levelDb.getLevelWithName(
					this.resources.getString(R.string.loadingExpertLevel)
			);
			final Theme randomTheme3 = new Theme(
					this.resources.getString(R.string.loadingExpertLevelRandomTheme),
					level.getId()
			);
			final Theme quoteTheme = new Theme(
					this.resources.getString(R.string.loadingExpertLevelMythologyTheme),
					level.getId()
			);
			final Theme literatureTheme = new Theme(
					this.resources.getString(R.string.loadingExpertLevelLiteratureTheme),
					level.getId()
			);
			final Theme wineTheme = new Theme(
					this.resources.getString(R.string.loadingExpertLevelWineTheme),
					level.getId()
			);
			this.themeDb.insertLevel(randomTheme3);
			this.themeDb.insertLevel(quoteTheme);
			this.themeDb.insertLevel(literatureTheme);
			this.themeDb.insertLevel(wineTheme);
			System.out.println("Init theme completed.");
		}
	}
	
	private void initQuestionAndAnswer() {
		if(this.questionDb.getNbQuestion() < 180) {
			System.out.println("Init question and answer...");
			this.questionDb.clear();
			this.answerDb.clear();
			
			Level level = this.levelDb.getLevelWithName(
					this.resources.getString(R.string.loadingBeginnerLevel)		
			);
			Theme theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingBeginnerLevelMoneyTheme),
					level.getId()
			);
			long levelId = level.getId();
			long themeId = theme.getId();
			
			System.out.println("Beginner questions and answers...");
			
			Question question = new Question(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion1), levelId, themeId);
			long questionId = this.questionDb.insertQuestion(question);
			Answer answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion1Answer1), questionId, levelId, themeId);
			long answerId = answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion1Answer2), questionId, levelId, themeId);
			answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion1Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion2), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion2Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion2Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion2Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion3), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion3Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion3Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion3Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion4), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion4Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion4Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion4Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion5), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion5Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion5Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion5Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion6), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion6Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion6Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion6Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion7), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion7Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion7Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion7Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion8), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion8Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion8Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion8Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion9), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion9Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion9Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion9Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion10), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion10Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion10Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelMoneyThemeQuestion10Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingBeginnerLevelAnimalsTheme),
					level.getId()
			);
			themeId = theme.getId();
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion1), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion1Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion1Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion1Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion2), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion2Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion2Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion2Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion3), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion3Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion3Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion3Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion4), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion4Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion4Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion4Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion5), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion5Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion5Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion5Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion6), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion6Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion6Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion6Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion7), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion7Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion7Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion7Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion8), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion8Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion8Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion8Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion9), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion9Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion9Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion9Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion10), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion10Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion10Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelAnimalsThemeQuestion10Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingBeginnerLevelGeographyTheme),
					level.getId()
			);
			themeId = theme.getId();
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion1), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion1Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion1Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion1Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion2), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion2Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion2Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion2Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion3), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion3Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion3Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion3Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion4), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion4Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion4Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion4Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion5), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion5Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion5Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion5Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion6), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion6Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion6Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion6Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion7), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion7Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion7Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion7Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion8), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion8Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion8Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion8Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion9), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion9Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion9Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion9Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion10), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion10Answer1), questionId, levelId, themeId);
			answerId = answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion10Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingBeginnerLevelGeographyThemeQuestion10Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingBeginnerLevelRandomTheme),
					level.getId()
			);
			themeId = theme.getId();

			for(Question q : this.questionDb.getQuestionsWithLevel(levelId)) {
				q.setThemeId(themeId);
				questionId = this.questionDb.insertQuestion(q);
			
				for(Answer a : this.answerDb.getAnswersWithLevelAndQuestion(levelId, q.getId())) {
					a.setThemeId(themeId);
					a.setQuestionId(questionId);
					this.answerDb.insertAnswer(a);
				}
			}
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			System.out.println("Beginner questions and answers completed.");
			
			level = this.levelDb.getLevelWithName(
					this.resources.getString(R.string.loadingIntermediateLevel)		
			);
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingIntermediateLevelGeneralTheme),
					level.getId()
			);
			levelId = level.getId();
			themeId = theme.getId();
			
			System.out.println("Intermediate questions and answers...");
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion1), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion1Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion1Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion1Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion2), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion2Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion2Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion2Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion3), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion3Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion3Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion3Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion4), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion4Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion4Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion4Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion5), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion5Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion5Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion5Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion6), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion6Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion6Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion6Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion7), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion7Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion7Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion7Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion8), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion8Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion8Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion8Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion9), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion9Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion9Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion9Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion10), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion10Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion10Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion10Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion11), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion11Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion11Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion11Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion12), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion12Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion12Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion12Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion13), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion13Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion13Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion13Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion14), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion14Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion14Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion14Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion15), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion15Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion15Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion15Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion16), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion16Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion16Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion16Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion17), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion17Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion17Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion17Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion18), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion18Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion18Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion18Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion19), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion19Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion19Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion19Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion20), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion20Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion20Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelGeneralThemeQuestion20Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingIntermediateLevelMusicTheme),
					level.getId()
			);
			themeId = theme.getId();
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion1), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion1Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion1Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion1Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion2), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion2Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion2Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion2Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion3), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion3Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion3Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion3Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion4), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion4Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion4Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion4Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion5), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion5Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion5Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion5Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion6), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion6Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion6Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion6Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion7), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion7Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion7Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion7Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion8), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion8Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion8Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion8Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion9), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion9Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion9Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion9Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion10), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion10Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion10Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion10Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion11), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion11Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion11Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion11Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion12), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion12Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion12Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion12Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion13), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion13Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion13Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion13Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion14), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion14Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion14Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion14Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion15), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion15Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion15Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion15Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion16), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion16Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion16Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion16Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion17), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion17Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion17Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion17Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion18), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion18Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion18Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion18Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion19), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion19Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion19Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion19Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion20), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion20Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion20Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelMusicThemeQuestion20Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingIntermediateLevelHistoryTheme),
					level.getId()
			);
			themeId = theme.getId();

			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion1), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion1Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion1Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion1Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion2), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion2Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion2Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion2Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion3), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion3Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion3Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion3Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion4), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion4Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion4Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion4Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion5), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion5Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion5Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion5Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion6), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion6Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion6Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion6Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion7), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion7Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion7Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion7Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion8), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion8Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion8Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion8Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion9), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion9Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion9Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion9Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion10), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion10Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion10Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion10Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion11), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion11Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion11Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion11Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion12), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion12Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion12Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion12Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion13), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion13Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion13Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion13Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion14), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion14Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion14Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion14Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion15), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion15Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion15Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion15Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion16), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion16Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion16Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion16Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion17), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion17Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion17Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion17Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion18), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion18Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion18Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion18Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion19), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion19Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion19Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion19Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion20), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion20Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion20Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingIntermediateLevelHistoryThemeQuestion20Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingIntermediateLevelRandomTheme),
					level.getId()
			);
			themeId = theme.getId();

			for(Question q : this.questionDb.getQuestionsWithLevel(levelId)) {
				q.setThemeId(themeId);
				questionId = this.questionDb.insertQuestion(q);
				
				for(Answer a : this.answerDb.getAnswersWithLevelAndQuestion(levelId, q.getId())) {
					a.setThemeId(themeId);
					a.setQuestionId(questionId);
					this.answerDb.insertAnswer(a);
				}
			}
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			System.out.println("Intermediate questions and answers completed.");
			
			level = this.levelDb.getLevelWithName(
					this.resources.getString(R.string.loadingExpertLevel)		
			);
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingExpertLevelMythologyTheme),
					level.getId()
			);
			levelId = level.getId();
			themeId = theme.getId();
			
			System.out.println("Expert questions and answers...");
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion1), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion1Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion1Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion1Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion2), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion2Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion2Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion2Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion3), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion3Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion3Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion3Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion4), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion4Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion4Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion4Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion5), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion5Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion5Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion5Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion6), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion6Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion6Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion6Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion7), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion7Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion7Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion7Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion8), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion8Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion8Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion8Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion9), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion9Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion9Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion9Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion10), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion10Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion10Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion10Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion11), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion11Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion11Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion11Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion12), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion12Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion12Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion12Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion13), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion13Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion13Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion13Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion14), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion14Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion14Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion14Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion15), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion15Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion15Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion15Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion16), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion16Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion16Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion16Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion17), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion17Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion17Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion17Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion18), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion18Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion18Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion18Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion19), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion19Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion19Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion19Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion20), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion20Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion20Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion20Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion21), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion21Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion21Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion21Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion22), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion22Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion22Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion22Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion23), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion23Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion23Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion23Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion24), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion24Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion24Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion24Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion25), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion25Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion25Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion25Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion26), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion26Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion26Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion26Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion27), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion27Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion27Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion27Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion28), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion28Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion28Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion28Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion29), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion29Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion29Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion29Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion30), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion30Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion30Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelMythologyThemeQuestion30Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingExpertLevelLiteratureTheme),
					level.getId()
			);
			themeId = theme.getId();
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion1), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion1Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion1Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion1Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion2), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion2Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion2Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion2Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion3), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion3Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion3Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion3Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion4), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion4Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion4Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion4Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion5), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion5Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion5Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion5Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion6), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion6Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion6Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion6Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion7), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion7Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion7Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion7Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion8), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion8Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion8Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion8Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion9), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion9Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion9Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion9Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion10), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion10Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion10Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion10Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion11), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion11Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion11Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion11Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion12), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion12Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion12Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion12Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion13), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion13Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion13Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion13Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion14), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion14Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion14Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion14Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion15), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion15Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion15Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion15Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion16), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion16Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion16Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion16Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion17), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion17Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion17Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion17Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion18), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion18Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion18Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion18Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion19), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion19Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion19Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion19Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion20), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion20Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion20Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion20Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion21), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion21Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion21Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion21Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion22), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion22Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion22Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion22Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion23), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion23Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion23Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion23Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion24), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion24Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion24Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion24Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion25), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion25Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion25Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion25Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion26), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion26Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion26Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion26Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion27), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion27Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion27Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion27Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion28), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion28Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion28Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion28Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion29), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion29Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion29Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion29Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion30), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion30Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion30Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelLiteratureThemeQuestion30Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingExpertLevelWineTheme),
					level.getId()
			);
			themeId = theme.getId();
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion1), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion1Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion1Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion1Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion2), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion2Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion2Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion2Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion3), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion3Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion3Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion3Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion4), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion4Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion4Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion4Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion5), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion5Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion5Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion5Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion6), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion6Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion6Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion6Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion7), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion7Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion7Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion7Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion8), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion8Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion8Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion8Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion9), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion9Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion9Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion9Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion10), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion10Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion10Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion10Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion11), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);			
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion11Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion11Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion11Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion12), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion12Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion12Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion12Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion13), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion13Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion13Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion13Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion14), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion14Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion14Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion14Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion15), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion15Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion15Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion15Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion16), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion16Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion16Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion16Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion17), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion17Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion17Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion17Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion18), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion18Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion18Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion18Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion19), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion19Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion19Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion19Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion20), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion20Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion20Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion20Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion21), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion21Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion21Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion21Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion22), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion22Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion22Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion22Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion23), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion23Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion23Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion23Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion24), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion24Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion24Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion24Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion25), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion25Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion25Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion25Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion26), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion26Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion26Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion26Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion27), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion27Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion27Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion27Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion28), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion28Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion28Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion28Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion29), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion29Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion29Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion29Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			question = new Question(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion30), levelId, themeId);
			questionId = this.questionDb.insertQuestion(question);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion30Answer1), questionId, levelId, themeId);
			answerId = this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion30Answer2), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			answer = new Answer(this.resources.getString(R.string.loadingExpertLevelWineThemeQuestion30Answer3), questionId, levelId, themeId);
			this.answerDb.insertAnswer(answer);
			question.setAnswerId(answerId);
			this.questionDb.updateQuestion(questionId, question);
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			theme = this.themeDb.getThemeWithNameAndLevel(
					this.resources.getString(R.string.loadingExpertLevelRandomTheme),
					level.getId()
			);
			themeId = theme.getId();

			for(Question q : this.questionDb.getQuestionsWithLevel(levelId)) {
				q.setThemeId(themeId);
				questionId = this.questionDb.insertQuestion(q);
				
				for(Answer a : this.answerDb.getAnswersWithLevelAndQuestion(levelId, q.getId())) {
					a.setThemeId(themeId);
					a.setQuestionId(questionId);
					this.answerDb.insertAnswer(a);
				}
			}
			
			System.out.println("LevelId : "+levelId);
			System.out.println("ThemeId : "+themeId);
			System.out.println("NB QUESTION : "+this.questionDb.getNbQuestion(levelId, themeId));
			System.out.println("NB ANSWER : "+this.answerDb.getNbAnswer(levelId, themeId));
			
			System.out.println("Expert questions and answers completed.");
		}
	}
	
	private void initScore() {
		for(Level level : this.levelDb.getAllLevels()) {
			if(this.scoreDb.getNbScore(level.getId(), Theme.NO_THEME) < 4) {
				System.out.println("Init score level : " + level.getName());
				this.scoreDb.clearMultiplayerScoresPart(level.getId());
				
				Score score;
				for(int i=0; i<4; i++) {
					score = new Score(0, 0, 0, level.getId(), 0, Theme.NO_THEME);
					score.setTournamentRank(0);
					this.scoreDb.insertScore(score);
				}
				System.out.println("Init score " + level.getName() + " completed.");
			}
		}
	}
}
